package net.techwatch.fsindex;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


/**
 * @author wiv
 *
 */
public class FileSystemObject {

	private long id;
	private long parentId;
	private String path;
	private long lastUpdate;
	private boolean file;
	
	/**
	 * Default constructor.
	 */
	public FileSystemObject() {
		// nothing to do
	}
	
	/**
	 * @param fileSystemId
	 * @param parentId
	 * @param path
	 * @param lastUpdate
	 * @param file
	 */
	public FileSystemObject(long fileSystemId, long parentId,
			String path, long lastUpdate, boolean file) {
		super();
		this.id = fileSystemId;
		this.parentId = parentId;
		this.path = path;
		this.lastUpdate = lastUpdate;
		this.file = file;
	}

	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(long fileSystemId) {
		this.id = fileSystemId;
	}

	/**
	 * @return the parent
	 */
	public long getParentId() {
		return parentId;
	}

	/**
	 * @param parent the parent to set
	 */
	public void setParent(long parentId) {
		this.parentId = parentId;
	}

	/**
	 * @return the path
	 */
	public String getPath() {
		return path;
	}

	/**
	 * @param path the path to set
	 */
	public void setPath(String path) {
		this.path = path;
	}

	/**
	 * @return the lastUpdate
	 */
	public long getLastUpdate() {
		return lastUpdate;
	}

	/**
	 * @param lastUpdate the lastUpdate to set
	 */
	public void setLastUpdate(long lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	/**
	 * @return the file
	 */
	public boolean isFile() {
		return file;
	}

	/**
	 * @param file the file to set
	 */
	public void setFile(boolean file) {
		this.file = file;
	}
	
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}
	
}
